/*
 * @Description:
 * @Autor: zhzj
 * @Date: 2020-12-21 14:58:14
 * @LastEditors: zhzj
 * @LastEditTime: 2020-12-21 14:58:14
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 获取表格数据
export const getClaimData = params => axios.get(`${SERVER.CMSCLOUD_WMS}/part/chaim`, { params });
// 获取索賠配件数据
export const getPartsGroup = params => axios.get(`${SERVER.CMSCLOUD_WMS}/part/chaim/getpartsbyid`, { params });
// 删除单条索賠數據0
export const cancelClaimById = id => axios.put(`${SERVER.CMSCLOUD_WMS}/part/chaim/${id}`, { params: { id: id }, menuId: '-1' });
// 查询采购订单
export const getPartOrder = params => axios.get(`${SERVER.CMSCLOUD_WMS}/part/chaim/getpartorder`, { params });
// 从采购订单中查询配件
export const getPartsByOrder = params => axios.get(`${SERVER.CMSCLOUD_WMS}/part/chaim/getpartbyorder`, { params });
// 保存
export const postSave = (params) => axios.post(`${SERVER.CMSCLOUD_WMS}/part/chaim/save`, params)
// 保存审批
export const postApprove = (params) => axios.post(`${SERVER.CMSCLOUD_WMS}/part/chaim/saveapprove`, params)
// 仓库处理
export const postSaveCk = (params) => axios.post(`${SERVER.CMSCLOUD_WMS}/part/chaim/saveck`, params)

// 获取审批历史
export const getApproveRecord = params => axios.get(`${SERVER.CMSCLOUD_WMS}/part/claimRtGoods/selectPartAuditByApplyNum`, { params });
